﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel;
using KerriganDataContract.Customer;

namespace KerriganDataContract.OfficialTest
{
    [DataContract]
    public class OfficialTestDC : INotifyPropertyChanged
    {
        private Int32 _id;

        private DateTime _date;

        private string _title;

        private int _maxApplicant;


        [DataMember]
        public Int32 Id
        {
            get
            {
                return this._id;
            }
            set
            {
                this._id = value;
                OnPropertyChanged("Id");
            }
        }

        [DataMember]
        public DateTime Date
        {
            get
            {
                return this._date;
            }
            set
            {
                this._date = value;
                OnPropertyChanged("Date");
            }
        }

        [DataMember]
        public string Title
        {
            get
            {
                return this._title;
            }
            set
            {
                this._title = value;
                OnPropertyChanged("Title");
            }
        }

        [DataMember]
        public int MaxApplicant
        {
            get
            {
                return this._maxApplicant;
            }
            set
            {
                this._maxApplicant = value;
                OnPropertyChanged("MaxApplicant");
            }
        }



        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

    }
}
